import request from '@/utils/request';

export async function approvalOrderData(params: any) {
  var data =  request('/xwyl/order/approvalOrderData', {
    params,
  });
  return data;
}

export function onlysave(params:any){
  return request('/xwyl/orderNew/onlysave', {
    method: 'POST',
    headers:{
      'Content-Type': 'application/json',
      'authorization':`${sessionStorage.getItem('token')}`
    },
    data: {
      ...params,
      method: 'post',
    },
  });
}

export function saveOrderForFinance(params:any){
  return request('/xwyl/orderNew/saveOrderForFinance', {
    method: 'POST',
    headers:{
      'Content-Type': 'application/json',
      'authorization':`${sessionStorage.getItem('token')}`
    },
    data: {
      ...params,
      method: 'post',
    },
  });
}

export function approveOrder(params:any){
  return request('/xwyl/order/approveOrder', {
    method: 'POST',
    requestType:'form',
    data: {
      ...params,
      method: 'post',
    },
  });
}

export function adjustListOfAdmin(params: any) {
  var data =  request('/xwyl/take/adjustListOfAdmin', {
    params,
  });
  return data;
}

export function getAdjustDetail(params:any){
  return request('/xwyl/take/getAdjustDetail', {
    method: 'POST',
    requestType:'form',
    data: {
      ...params,
      method: 'post',
    },
  });
}

export function verifyAdjust(params:any){
  return request('/xwyl/take/verifyAdjust', {
    method: 'POST',
    requestType:'form',
    data: {
      ...params,
      method: 'post',
    },
  });
}

